wget https://repo.continuum.io/miniconda/Miniconda-latest-MacOSX-x86_64.sh

chmod +x Miniconda-latest-MacOSX-x86_64.sh

# Agree to licenses
./Miniconda-latest-MacOSX-x86_64.sh

source ~/.bashrc
conda update conda -y

# Python 2
conda create -n py2 python=2 anaconda jupyter notebook -y 

# Python 3
conda create -n py3 python=3 anaconda jupyter notebook -y 

# Install R
conda create -n jupyter_r -c r r-irkernel r-essentials r-recommended rpy2 -y
source activate jupyter_r
source deactivate

conda env list

In [ ]: